<?php

namespace App\Http\Requests\Api;

class ResumeOtherRequest extends ApiRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'id' => $this->is('*/update') ? 'bail|required|integer' : '',
            'resume_id' => $this->is('*/create') ? 'bail|required|integer' : '',
            'title' => 'required',
            'content' => 'required',
        ];
    }

    /*
     * 字段描述
     */
    public function attributes()
    {
        return [
            'title' => '主题',
            'content' => '内容',
        ];
    }
}
